package com.zyh.homework.test05;

import java.util.ArrayList;
import java.util.Arrays;

public class Test5 {
    public static void main(String[] args) {
        String[] str = {"bca", "dadfa", "dddaaa", "你好啊", "我来啦,你干嘛呢", "别跑啊"};
        System.out.print("源字符串:\n"+Arrays.toString(str)+"\n");
        ArrayList<String> arr = new ArrayList<>();
        for (int i = 0; i < str.length; i++) {
            if (str[i].length() > 5) {
                continue;
            } else {
                arr.add(str[i]);
            }
        }
        System.out.print("删除后：\n" + arr);
    }
}
